package com.fifth.apartment.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("菜单")
@TableName("menu")
public class Menu {

    @ApiModelProperty("菜单id")
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;
    @ApiModelProperty("菜单名")
    private String title;
    @ApiModelProperty("菜单链接地址")
    private String path;
    @ApiModelProperty("父级id")
    @TableField("parentId")
    private int parentId;
    @ApiModelProperty("图标")
    private String icon;
    @ApiModelProperty("逻辑删除")
    private int status;
    @TableField("redirect")
    private String redirect;

    @TableField("name")
    private String name;

    @TableField(exist = false)
    private List<MVo> children;

    @TableField(exist = false)
    private Meta meta;
}
